package com.example.kjdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;


import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    Button commit_btn;
    TextView textView;
    TextView textView2;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        commit_btn = findViewById(R.id.commit_btn);
        textView = findViewById(R.id.textView);
        textView2 = findViewById(R.id.textView);
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.commit_btn){
            Toast.makeText(getApplicationContext(),"点击按钮",Toast.LENGTH_LONG).show();
        }



    }
}